package com.aspose.cells;

public abstract class ActiveXControl extends ActiveXControlBase {
   Font a;

   ActiveXControl(Shape shape) {
      super(shape);
   }

   public boolean isEnabled() {
      return this.e.a(1);
   }

   public void setEnabled(boolean value) {
      this.e.a(1, value);
      this.b(14);
   }

   public boolean isLocked() {
      return this.e.a(2);
   }

   public void setLocked(boolean value) {
      this.e.a(2, value);
      this.b(14);
   }

   public boolean isTransparent() {
      return !this.e.a(3);
   }

   public void setTransparent(boolean value) {
      this.e.a(3, !value);
      this.b(14);
   }

   public boolean isAutoSize() {
      return this.e.a(28);
   }

   public void setAutoSize(boolean value) {
      this.e.a(28, value);
      this.b(14);
   }

   public int getIMEMode() {
      byte var1 = 15;
      return this.e.a >> var1 & 15;
   }

   public void setIMEMode(int value) {
      byte var2 = 15;
      this.e.a &= ~(15 << var2);
      this.e.a |= value << var2;
   }

   public Font getFont() {
      if (this.a == null) {
         this.a();
      }

      return this.a;
   }

   void a() {
      WorksheetCollection var1 = this.b == null ? null : this.b.L();
      this.a = new Font(var1, this.b, false);
      this.a.e = "MS Sans Serif";
      this.a.d = 1;
      this.a.a = 1;
   }

   public int getTextAlign() {
      switch(this.e.q) {
      case 1:
         return 7;
      case 2:
         return 1;
      case 3:
         return 8;
      default:
         return 7;
      }
   }

   public void setTextAlign(int value) {
      byte var2 = 0;
      switch(value) {
      case 1:
         var2 = 2;
         break;
      case 7:
         var2 = 1;
         break;
      case 8:
         var2 = 3;
      }

      this.e.q = (byte)var2;
   }

   public byte[] getData() throws Exception {
      zac var1 = new zac(this);
      return var1.a();
   }
}
